package com.clz.hyperit.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.Generated;
import org.hibernate.annotations.GenerationTime;

import com.clz.hyperit.util.IdAnnotationin;
import com.fasterxml.jackson.annotation.JsonInclude;

/**
 * 关注关联表
 * 
 * @author Mr.Chen
 * 
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
@Entity
@Table(name = "follow", catalog = "hyperit")
public class Follow {

	@IdAnnotationin
	private Integer id;
	private Integer userDetail_id;
	private Integer blog_id; // 被关注的id
	private String createtime;
	public Follow() {

	}

	public Follow(Integer id,String createtime) {
		this.createtime = createtime;
		this.id = id;
	}

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "userdetail_id")
	public Integer getUserDetail_id() {
		return userDetail_id;
	}

	public void setUserDetail_id(Integer userDetail_id) {
		this.userDetail_id = userDetail_id;
	}

	@Column(name = "blog_id")
	public Integer getBlog_id() {
		return blog_id;
	}

	public void setBlog_id(Integer blog_id) {
		this.blog_id = blog_id;
	}
	@Generated(GenerationTime.INSERT)
	@Column(name = "createtime")
	public String getCreatetime() {
		return createtime;
	}

	public void setCreatetime(String createtime) {
		this.createtime = createtime;
	}

	@Override
	public String toString() {
		return "Follow [id=" + id + ", userDetail_id=" + userDetail_id
				+ ", blog_id=" + blog_id + ", createtime=" + createtime + "]";
	}


	

}
